package designPattern.StrategyPattern;

import designPattern.StrategyPattern.impl.AttackXlsbz;
import designPattern.StrategyPattern.impl.DIsplayEye;
import designPattern.StrategyPattern.impl.DefendTBS;
import designPattern.StrategyPattern.impl.RunBmsg;

/**
 * @author jiangwz
 * @create 2019/10/30.
 */
public class Main {

    public static void main(String[] args){

        Role role = new RoleQiaofeng().setAttackBehavior(new AttackXlsbz())
                .setDefendBehavior(new DefendTBS())
                .setDisplayBehavior(new DIsplayEye())
                .setRunBehavior(new RunBmsg())
                .setName("乔峰");
        System.out.println(role.getName());
        role.attack();
        role.defend();
        role.display();
        role.run();
    }
}
